<template>
	<view>
		<view class="box">
			<view class="title">请设置新支付密码</view>
			<view class="input_box">
				<view class="item " :class="item == newPassword.length?'active':''" v-for="item in 6" >{{newPassword[item]}}</view>
			
				<input type="number" class="newPassword" v-model="newPassword" :maxlength="6">
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				newPassword: ""
			};
		},
	}
</script>

<style lang="scss" scoped>
	.box {
		width: 660rpx;
		height: 288rpx;
		background: #FFFFFF;
		border-radius: 20rpx 20rpx 20rpx 20rpx;
		margin: 118rpx auto 0 auto;
		padding: 0 84rpx;
		box-sizing: border-box;
		display: table;
		content: "";

		.title {
			font-size: 36rpx;
			font-family: Source Han Sans CN-Medium, Source Han Sans CN;
			font-weight: 500;
			color: #222222;
			text-align: center;
			margin-top: 60rpx;
			line-height: 1em;
		}

		.input_box {
			height: 82rpx;
			width: 100%;
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-top: 50rpx;
			position: relative;

			.item {
				width: 74rpx;
				height: 82rpx;
				background: #F7F7F7;
				border-radius: 18rpx 18rpx 18rpx 18rpx;
				box-sizing: border-box;
				display: flex;
				justify-content: center;
				align-items: center;
			}

			.newPassword {
				width: 100%;
				height: 82rpx;
				position: absolute;
				bottom: 0;
				color: transparent;
			}

			.active {
				border: 2rpx solid #F94D29;
			}
		}
	}
</style>
